<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Netbook shop</title>
		<%@include file="header.jsp" %>
		<script type="text/javascript">
			$(document).delegate(".storebox", "hover", function() {
				$(this).toggleClass("selectedStore");   
			});
		</script>
	</head>
	<body>
		<div id="wrapper">
			<div id="splash">
				<img src="resources/images/pic1.jpg" alt="" />
			</div>
			<div id="menu">
				<ul>				
					<li><a href="index">Homepage</a></li>
					<li><a href="notebooks">Notebooks</a></li>
					<li>Account <span class="arrow"></span>
						<ul>
							<c:choose>
								<c:when test="${ firstname != null }">
									<li class="first"><a href="logout">Logout</a></li>
								</c:when>
								<c:when test="${ firstname == null}">
									<li class="first"><a href="login">Inloggen</a></li>
									<li><a href="registratie">Registreren</a></li>
								</c:when>
							</c:choose>	
						</ul>
					</li>
					<li><a href="about">About</a></li>
					<c:choose>
						<c:when test="${ admin == 0 || admin == null }">
							<li class ="cartI"> <img src="resources/images/shopping_cart.png" alt="" /></li>
							<li class ="cart"><a href="winkelwagen">Winkelwagen</a></li>
						</c:when>
						<c:when test="${ admin == 1 }">
							<li class ="cartI"> <img src="resources/images/adminmodule.png" alt="" /></li>
							<li class ="cart"><a href="admin">Admin module</a></li>
						</c:when>
					</c:choose>		
				</ul>				
				<br class="clearfix" />
			</div>
			
			<div id="page">
				<div id="content">
					<div class="box">
						<h1>Verkooppunten</h1>						
					</div>
					<div>
						<c:if test="${noStores == true}">
							Geen verkooppunten gevonden voor deze laptop !
						</c:if>
						<c:forEach items="${stores}" var="store">
							<div class="storebox">
								<span class="center" >
									<h2>${store.name}</h2>
									<h3>&euro; ${store.prijs}</h3>								
								</span>
								<p> <b>Adres :</b> <br />
									${store.address}
									<br />
									${store.zip} ${store.city}
								</p>
								<p><b>Tel :</b> <br />
								 	${store.phone}
								</p>
								 <b>Website</b> : <br />
								 <c:choose>
								 	<c:when test="${store.website != null}">
								 		<a href="http://${store.website}" target="new" >${store.website}</a>
								 	</c:when>
								 	<c:otherwise>
								 		/
								 	</c:otherwise>
								 </c:choose>
							</div>
						</c:forEach>
					</div>
					
					<br class="clearfix" />
				</div>
				<div id="sidebar">
									<div class="box" >
					<h3>Mijn Account</h3>
								<c:choose>
									<c:when test="${firstname != null}">
									Welkom, <a href="account" ><c:out value="${firstname}"></c:out></a>
									</c:when>
									<c:when test="${firstname == null}">
									Log nu in !
									</c:when>
								</c:choose>
					</div>
					<div class="box">
						<h3>contact</h3>
						<p>
							Neem contact op door <a href="mailto:info@notebookshop.com">hier</a> te klikken.
						</p>
					</div>
				</div>
				<br class="clearfix" />
			</div>
		</div>
		<div id="footer">
			
		</div>
	</body>
</html>